import request from '@/request';

export async function getRechageList() {
    return request.get<API.Recharge>('api/charge/package', {});
}

type OrderParams = {
    appid: string; //	是	int	应用appid
    package_id: number; //	是	int	充值套餐ID
    anid?: number; //	否	int	漫画ID
    chaps?: number; //	否	int	漫画章节
    qid?: number; //	否	int	推广ID
    promotionid?: number; //	否	int	广告ID
    clickid?: string; //	否	string	广告事件ID
};

export async function getOrder(OrderParams: OrderParams) {
    return request.post<any>('api/charge/createOrder', OrderParams);
}

export async function queryOrder(id: number) {
    return request.get<API.Order>(`api/charge/queryOrder/${id}`, {});
}
